package com.dragon.modules.yuegou.query.merchant;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.merchant.WechatEntity;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

/**
 * 商户关联微信用户 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2022-03-26 09:44:39
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class WechatQuery extends WechatEntity implements Query<WechatEntity> {

    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 商户ID查询条件 */
	@JsonUnwrapped(prefix = "merchantId")
	private Condition<String> merchantIdCondition;

    /** openid查询条件 */
	@JsonUnwrapped(prefix = "openid")
	private Condition<String> openidCondition;

    /** 昵称查询条件 */
	@JsonUnwrapped(prefix = "nickname")
	private Condition<String> nicknameCondition;

    /** 省份查询条件 */
	@JsonUnwrapped(prefix = "province")
	private Condition<String> provinceCondition;

    /** 城市查询条件 */
	@JsonUnwrapped(prefix = "city")
	private Condition<String> cityCondition;

    /** 国家查询条件 */
	@JsonUnwrapped(prefix = "country")
	private Condition<String> countryCondition;

    /** 头像查询条件 */
	@JsonUnwrapped(prefix = "headimgurl")
	private Condition<String> headimgurlCondition;

    /** 特权信息查询条件 */
	@JsonUnwrapped(prefix = "privilege")
	private Condition<String> privilegeCondition;

    /** 统一标识查询条件 */
	@JsonUnwrapped(prefix = "unionid")
	private Condition<String> unionidCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public WechatQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public WechatQuery(WechatEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public WechatQuery(WechatQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.merchantIdCondition != null) {
			this.merchantIdCondition = other.merchantIdCondition.copy();
		}
		if(other.openidCondition != null) {
			this.openidCondition = other.openidCondition.copy();
		}
		if(other.nicknameCondition != null) {
			this.nicknameCondition = other.nicknameCondition.copy();
		}
		if(other.provinceCondition != null) {
			this.provinceCondition = other.provinceCondition.copy();
		}
		if(other.cityCondition != null) {
			this.cityCondition = other.cityCondition.copy();
		}
		if(other.countryCondition != null) {
			this.countryCondition = other.countryCondition.copy();
		}
		if(other.headimgurlCondition != null) {
			this.headimgurlCondition = other.headimgurlCondition.copy();
		}
		if(other.privilegeCondition != null) {
			this.privilegeCondition = other.privilegeCondition.copy();
		}
		if(other.unionidCondition != null) {
			this.unionidCondition = other.unionidCondition.copy();
		}
	}

	@Override
	public QueryWrapper<WechatEntity> toQueryWrapper() {
		QueryWrapper<WechatEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (merchantIdCondition != null) {
			merchantIdCondition.toWrapper(wrapper, COL_MERCHANT_ID);
		}
		if (openidCondition != null) {
			openidCondition.toWrapper(wrapper, COL_OPENID);
		}
		if (nicknameCondition != null) {
			nicknameCondition.toWrapper(wrapper, COL_NICKNAME);
		}
		if (provinceCondition != null) {
			provinceCondition.toWrapper(wrapper, COL_PROVINCE);
		}
		if (cityCondition != null) {
			cityCondition.toWrapper(wrapper, COL_CITY);
		}
		if (countryCondition != null) {
			countryCondition.toWrapper(wrapper, COL_COUNTRY);
		}
		if (headimgurlCondition != null) {
			headimgurlCondition.toWrapper(wrapper, COL_HEADIMGURL);
		}
		if (privilegeCondition != null) {
			privilegeCondition.toWrapper(wrapper, COL_PRIVILEGE);
		}
		if (unionidCondition != null) {
			unionidCondition.toWrapper(wrapper, COL_UNIONID);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> merchantId() {
		this.merchantIdCondition = new Condition<>();
		return this.merchantIdCondition;
	}
	
	/**
	 * 获取商户ID查询条件
	 * 
	 * @return merchantIdCondition 商户ID查询条件
	 */
	public Condition<String> getMerchantIdCondition() {
		return merchantIdCondition;
	}

	/**
	 * 设置商户ID查询条件
	 * 
	 * @param merchantIdCondition 商户ID查询条件
	 */
	public void setMerchantIdCondition(Condition<String> merchantIdCondition) {
		this.merchantIdCondition = merchantIdCondition;
	}

	/**
	 * 构造并返回openid查询条件
	 * 
	 * @return openidCondition openid查询条件
	 */
	public Condition<String> openid() {
		this.openidCondition = new Condition<>();
		return this.openidCondition;
	}
	
	/**
	 * 获取openid查询条件
	 * 
	 * @return openidCondition openid查询条件
	 */
	public Condition<String> getOpenidCondition() {
		return openidCondition;
	}

	/**
	 * 设置openid查询条件
	 * 
	 * @param openidCondition openid查询条件
	 */
	public void setOpenidCondition(Condition<String> openidCondition) {
		this.openidCondition = openidCondition;
	}

	/**
	 * 构造并返回昵称查询条件
	 * 
	 * @return nicknameCondition 昵称查询条件
	 */
	public Condition<String> nickname() {
		this.nicknameCondition = new Condition<>();
		return this.nicknameCondition;
	}
	
	/**
	 * 获取昵称查询条件
	 * 
	 * @return nicknameCondition 昵称查询条件
	 */
	public Condition<String> getNicknameCondition() {
		return nicknameCondition;
	}

	/**
	 * 设置昵称查询条件
	 * 
	 * @param nicknameCondition 昵称查询条件
	 */
	public void setNicknameCondition(Condition<String> nicknameCondition) {
		this.nicknameCondition = nicknameCondition;
	}

	/**
	 * 构造并返回省份查询条件
	 * 
	 * @return provinceCondition 省份查询条件
	 */
	public Condition<String> province() {
		this.provinceCondition = new Condition<>();
		return this.provinceCondition;
	}
	
	/**
	 * 获取省份查询条件
	 * 
	 * @return provinceCondition 省份查询条件
	 */
	public Condition<String> getProvinceCondition() {
		return provinceCondition;
	}

	/**
	 * 设置省份查询条件
	 * 
	 * @param provinceCondition 省份查询条件
	 */
	public void setProvinceCondition(Condition<String> provinceCondition) {
		this.provinceCondition = provinceCondition;
	}

	/**
	 * 构造并返回城市查询条件
	 * 
	 * @return cityCondition 城市查询条件
	 */
	public Condition<String> city() {
		this.cityCondition = new Condition<>();
		return this.cityCondition;
	}
	
	/**
	 * 获取城市查询条件
	 * 
	 * @return cityCondition 城市查询条件
	 */
	public Condition<String> getCityCondition() {
		return cityCondition;
	}

	/**
	 * 设置城市查询条件
	 * 
	 * @param cityCondition 城市查询条件
	 */
	public void setCityCondition(Condition<String> cityCondition) {
		this.cityCondition = cityCondition;
	}

	/**
	 * 构造并返回国家查询条件
	 * 
	 * @return countryCondition 国家查询条件
	 */
	public Condition<String> country() {
		this.countryCondition = new Condition<>();
		return this.countryCondition;
	}
	
	/**
	 * 获取国家查询条件
	 * 
	 * @return countryCondition 国家查询条件
	 */
	public Condition<String> getCountryCondition() {
		return countryCondition;
	}

	/**
	 * 设置国家查询条件
	 * 
	 * @param countryCondition 国家查询条件
	 */
	public void setCountryCondition(Condition<String> countryCondition) {
		this.countryCondition = countryCondition;
	}

	/**
	 * 构造并返回头像查询条件
	 * 
	 * @return headimgurlCondition 头像查询条件
	 */
	public Condition<String> headimgurl() {
		this.headimgurlCondition = new Condition<>();
		return this.headimgurlCondition;
	}
	
	/**
	 * 获取头像查询条件
	 * 
	 * @return headimgurlCondition 头像查询条件
	 */
	public Condition<String> getHeadimgurlCondition() {
		return headimgurlCondition;
	}

	/**
	 * 设置头像查询条件
	 * 
	 * @param headimgurlCondition 头像查询条件
	 */
	public void setHeadimgurlCondition(Condition<String> headimgurlCondition) {
		this.headimgurlCondition = headimgurlCondition;
	}

	/**
	 * 构造并返回特权信息查询条件
	 * 
	 * @return privilegeCondition 特权信息查询条件
	 */
	public Condition<String> privilege() {
		this.privilegeCondition = new Condition<>();
		return this.privilegeCondition;
	}
	
	/**
	 * 获取特权信息查询条件
	 * 
	 * @return privilegeCondition 特权信息查询条件
	 */
	public Condition<String> getPrivilegeCondition() {
		return privilegeCondition;
	}

	/**
	 * 设置特权信息查询条件
	 * 
	 * @param privilegeCondition 特权信息查询条件
	 */
	public void setPrivilegeCondition(Condition<String> privilegeCondition) {
		this.privilegeCondition = privilegeCondition;
	}

	/**
	 * 构造并返回统一标识查询条件
	 * 
	 * @return unionidCondition 统一标识查询条件
	 */
	public Condition<String> unionid() {
		this.unionidCondition = new Condition<>();
		return this.unionidCondition;
	}
	
	/**
	 * 获取统一标识查询条件
	 * 
	 * @return unionidCondition 统一标识查询条件
	 */
	public Condition<String> getUnionidCondition() {
		return unionidCondition;
	}

	/**
	 * 设置统一标识查询条件
	 * 
	 * @param unionidCondition 统一标识查询条件
	 */
	public void setUnionidCondition(Condition<String> unionidCondition) {
		this.unionidCondition = unionidCondition;
	}

}
